How does the RedPitaya's PID work?

Just about everything about Red Pitaya
Post Reply
plauria
Posts: 11
Joined: Wed Jul 23, 2014 6:57 pm

How does the RedPitaya's PID work?

Post by plauria » Fri Oct 03, 2014 7:50 pm

Hi,

I'm familiar with basic PID controllers and have used them before. But the diagram given doesn't really make sense to me:

Code: Select all

*
 * The PID Controller algorithm itself is implemented in FPGA.
 * There are 4 independent PID controllers, connecting each input (IN1, IN2)
 * to each output (OUT1, OUT2):
 *
 *                 /-------\       /-----------\
 *   IN1 -----+--> | PID11 | ------| SUM & SAT | ---> OUT1
 *            |    \-------/       \-----------/
 *            |                            ^
 *            |    /-------\               |
 *            ---> | PID21 | ----------    |
 *                 \-------/           |   |
 *                                     |   |
 *                                     |   |
 *                                     |   |
 *                 /-------\           |   |
 *            ---> | PID12 | --------------
 *            |    \-------/           |
 *            |                        ˇ
 *            |    /-------\       /-----------\
 *   IN2 -----+--> | PID22 | ------| SUM & SAT | ---> OUT2
 *                 \-------/       \-----------/
 *
 */
 
Some questions:

What does "SUM & SAT" mean? What is this step doing, actually implementing the PID algorithm?

Why are there 4 PID controllers? There are only 2 high speed inputs! It seems to me like you'd need 1 controller per input. So this makes no sense to me.

Why do the 2 high-speed inputs seem coupled? I just want to use one high-speed input to produce a signal on one high-speed output. Maybe I'll have two experiments going at once, necessitating the use of both inputs and outputs, but in either case I cant imagine wanting the inputs to be coupled.

Lastly, somewhat unrelated, but my redpitaya cannot be connected to the internet... where can I find the apps described on this page? http://bazaar.redpitaya.com/ There are no links anywhere on that page! Why does it even exist?? :x

Thanks for helping to resolve my confusion!

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: How does the RedPitaya's PID work?

Post by Nils Roos » Fri Oct 03, 2014 8:50 pm

Your first three question tie all into the same topic, the 2x2 MIMO configuration of the PID controller. Though your application may not require it, there are scenarious where one output depends on two inputs. To accommodate those applications, there are 4 PID blocks, allowing both inputs to contribute to both outputs, via the SUMmation & SATuration stages, that sum the outputs of 2 PID blocks each and apply a saturation function to stay within the allowed range of output values.
If you do not want to use the "cross-talk" paths, you can configure the corresponding PID blocks (PID21, PID12) to constant 0 output.

Regarding the Bazaar page, if you visit this page via your RedPitaya, the applications will have links. This only works when your RedPitaya can connect to the internet, sadly. Additional links to download the packaged applications for later transfer to the RedPitaya would be a good thing to have.
Especially so now that there are some applications that are not included in the github repo.

plauria
Posts: 11
Joined: Wed Jul 23, 2014 6:57 pm

Re: How does the RedPitaya's PID work?

Post by plauria » Tue Oct 07, 2014 6:16 pm

Thanks Nils! Do you know where those packages are? my google-fu fails me. I'd really like to use the GUI PID tool!

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: How does the RedPitaya's PID work?

Post by Nils Roos » Tue Oct 07, 2014 7:18 pm

Here are links to all currently available packages from the Bazaar page:
scope-0.92-233.zip
spectrum-0.92-233.zip
scope+gen-0.92-233.zip
calscope-0.92-3.zip
calgenscope-0.92-3.zip
testspectrum-0.92-1.zip
lti-0.92-1.zip
scope+istsensor-0.1-0.zip
freqanalyzer-0.91-13013.zip
scope+pid-0.91-13014.zip
(ecosystem-0.92-378.zip)

To install, kill nginx, make /opt writable (execute 'rw' from shell), unpack the application's zip into /opt/www/apps/, remount /opt ('ro') and reboot.
To install the ecosystem, do the same but unpack the zip into /opt/
(all this applies only if you are doing it on your RP from a shell - if you have the SD plugged into another computer, substitute the SD's mountpath for /opt and just unpack the zips)

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: How does the RedPitaya's PID work?

Post by Nils Roos » Sun Oct 12, 2014 5:30 pm

OK, it's been a while since I had a good look at the wiki.

"Official" builds of all RedPitaya ecosystem- and application-versions can be found in the links given in the 5. Installing applications section.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 21 guests