PID controller from UDB, or other part of fabric?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user_108962310
Level 4
Level 4
10 likes received 10 likes given 5 likes given
        Hi everyone, I was curious if it would be possible to implement a PID controller (discrete, z transform formulation) into the PSoC5, via the PLD features it has? I'm really no expert on PLD/FPGA stuff; I think I cracked a VHDL book back in my undergrad days, but that's about it. I'm asking because in this design that I'm doing a virtual prototype for, we use several PID controllers. I'm sure I can implement them on the ARM code, but I'm curious if there is some way to generate a peripheral block that could do the same function, separate from the core? To the point where it could be dropped into the schematic, have software or hardware update triggering, and provide an API for loading and reading out values. That would simplify our design cycle unbelivably, if all the control loops were done in peripheral. If that is possible, and a Cypress app engineer is reading this ... hint hint! But, if anyone savvy could estimate if this is at all possible with the Psoc5lp architecture, please let me know. The *one* advantage of the dsPIC that we're currently using is that it has a fast 3rd order Z-transform general PID controller already in the DSP library. Thanks, Andrew   
0 Likes
5 Replies
user_108962310
Level 4
Level 4
10 likes received 10 likes given 5 likes given
        Eck, sorry about the run-on posts. There's something really odd about this forum ... in IE, I get a 2-line, 22-character wide text box that can't be expanded, and in Chrome, I get no text box at all ... So, I hope folks can parse that mess above ...   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Use IE and switch on "Compatibility Mode", that will give you some better window to enter your text.

   

PID controller from UDB and its DataPath will not be too difficult to implement, there are registers, an ALU, 2 FIFOs and more than a handful of instructions. Have a look into your VeriLog handbook that has been installed together with Creator.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You could consider implmenting most of that with DFB Assembler

   

and DFB block.

   

 

   

    

   

          

   

http://www.cypress.com/?rID=60720

   

http://video.cypress.com/video-library/video/PSoC-Software/PSoC-Creator-DFB-Component/1741620506001

   

 

   

Regards, Dana.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Since for PID you need multiplication, this will be difficult to implement in the UDBs (or the DataPath).

   

Using the DFB as DSP engine should work better, but is more complicated. You also have the issue of getting the output value to where you need it (e.g. driving a PWM or a DAC).

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Output of DFB accessable thru DMA.

   

 

   

Regards, Dana.

0 Likes