Using uC to perform as a PI Controller

Thread Starter

espire

Joined Dec 18, 2007
24
Hi all,

I am now working on a one cycle control project as shown below.
This project is make up of op-amps blocks.
How should I go about to implement it in a uC using C code without using any op-amps.
I understand it is sort of PI/PID controller.

 

beenthere

Joined Apr 20, 2004
15,819
What you are being asked to do is to make a simulator. The commercial product that does simulations is SPICE.

Most parts and amps have files that describe their response in the SPICE simulator. You could get the SPICE descriptive files for your circuit and use them to let you figure out how to write the simulation.

Hope you have a few months to work before you have to turn in the project.
 

Thread Starter

espire

Joined Dec 18, 2007
24
What you are being asked to do is to make a simulator. The commercial product that does simulations is SPICE.

Most parts and amps have files that describe their response in the SPICE simulator. You could get the SPICE descriptive files for your circuit and use them to let you figure out how to write the simulation.

Hope you have a few months to work before you have to turn in the project.
Its actually not a simulation.
Through the monitoring of output and feedback, the aim is to control a MOSFET to provide the optimum output voltage and sinusoidal input current to achieve unity power factor.
It has been done previously using op-amps.
I am tasked to do it with uC.. thus I am puzzled how can I make the uC perform as similar to the op-amps.
I understand SPICE is a simulation program that provide analysis.
How does it help in writing C code for the uC..
Pls advised.. I am lost...

Many Thanks.
 

Thread Starter

espire

Joined Dec 18, 2007
24
Yes, I have a uC with 2 ADCs and PWM, yes one op-amp for current sense.
What should I do next.. pls advise.

Thank you
 
Top