marceluda / rp_lock-in_pid_h

Lock-in and PID application for RedPitaya enviroment (only with harmonic modulation)
GNU General Public License v3.0
7 stars 8 forks source link

Bad convert to int to V - oscilloscope #1

Closed RobaczeQ closed 3 years ago

RobaczeQ commented 4 years ago

Hello,

I got a problem using oscilloscope, that signal in raw mode have amplitude about 150 int (raw mode) and looks like it's 1 V (not raw mode), but should be 150/8192? 8192 int is like 50 V

Also, could be lower amplitude in Harmonic oscilator? Or amplification like x0.5, x0.25 ...? x512k looks like overkill when base amplitude is around 150 int.

I have also problem with PID B that parameters goes up and down by 2 or unresponsive. (I also saw that in TODO.md, but not in todo in README.md)

Last time I was using your PID aplication, where there wasn't oscylloscope only page with parameters, back then I needed such higher kd and ki values, I changed to have 2^24 kd and ki (used like kd=300-500k ). As far as I can see now, I can use "More Options" amplification, i understand kp, ki, but what's with kd? 0-16? What does it mean?

Also, using web application for longer period of time uses a lot of ram, its possible to offload app without restarting page? Or if used F5 to reload, don't change last used parameters (by default it clears all)?

marceluda commented 4 years ago

Hello RobaczeQ

Which signal has the calibration problem?

The in1-in2 signals use the internal calibration of the oscilloscope. If it is wrong, you can calibrate it with the calib tool: calib doc

Which signal do you need with lower amplitude? If it is the signal for modulation ... I've made a version of the App with Harmonic-only Lock-in and regulable amplitud output: https://marceluda.github.io/rp_lock-in_pid/Derivated/ Also, you can lower the signal by using the PID proportional parameter. I don't know with application do you have in mind...

You are right about kd. I should document ir better. kd is a proportional parameter and the param regulatin the derivative time constant has no labels... I'm going to look at the code and document it correctly.

About the restar... you ar right ... if you restart the same App you lose your params. If you close the page... the FPGA is still doing it's work. If you want to get your control back without interrupting the FPGA work, you should load another App version: The Reload version. Thas it's purpose... just load the web and use the params already running on the FPGA...

RobaczeQ commented 4 years ago

Which signal has the calibration problem?

The in1-in2 signals use the internal calibration of the oscilloscope. If it is wrong, you can calibrate it with the calib tool: calib doc

Ahh, That's right, I was trying remote control scripts and example_calibration.py probably do that. Sorry for the trouble.

Which signal do you need with lower amplitude? If it is the signal for modulation ... I've made a version of the App with Harmonic-only Lock-in and regulable amplitud output: https://marceluda.github.io/rp_lock-in_pid/Derivated/ Also, you can lower the signal by using the PID proportional parameter. I don't know with application do you have in mind...

Yes, I`m talking about Derivated version. In mind i had "Lock-in modules" -> "Harmonic oscilator", can change period and phase of Xo/Yo/F1o/F2o/F3o, can also get higer amplitude by amplification x1-x512k, but cant get lower amplitude (without using low-pass filter) (using in1 as input).

You are right about kd. I should document ir better. kd is a proportional parameter and the param regulatin the derivative time constant has no labels... I'm going to look at the code and document it correctly.

About the restar... you ar right ... if you restart the same App you lose your params. If you close the page... the FPGA is still doing it's work. If you want to get your control back without interrupting the FPGA work, you should load another App version: The Reload version. Thas it's purpose... just load the web and use the params already running on the FPGA...

Aaa.... I knew about default and debug, what the difference, but i didn't think that in reload You can just reload app without loosing params. Thanks for your time.

marceluda commented 4 years ago

Well... I fixed th Derivative Labels of DSR

The fixed version is available on:

https://marceluda.github.io/rp_lock-in_pid/Derivated/

https://marceluda.github.io/rp_lock-in_pid/TheApp/install/

I repalced the int values by its physical value:

[0,3,6,10,13,16]

is

['7.5 ns','60 ns','480 ns','7.68 us','61.44 us','491.5 us']