cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Contributor II
        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
Reply
5 Replies
Contributor II
        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
Reply
Esteemed Contributor II

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
Reply
Esteemed Contributor

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
Reply
Honored Contributor II

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
Reply
Esteemed Contributor

Output of DFB accessable thru DMA.

   

 

   

Regards, Dana.

0 Likes
Reply