This program is applied to the 51 MCU.
/*************Define global variables *****************/
Uchar Kp, TI, Td
Int Set_speed;
/*************PID initialization function***************/
Void PID_init(void){
Serror=0;
FError=0;
Kp=30;
TI=500;
Td=10;
}
Int PID_control(int Now_speed)
{
Int Error,Serror,result;
Error=Now_speed-Set_speed;
Serror=Serror+Error;
Result=(Kp*Error+Kp*0.05/TI*Serror+Kp*Td/0.05*(Error-FError));
FError=Error;
/ / Limit the duty cycle
If(result10)
{result=0;} else
If(result"1000)
{result=1000;}
Return result;
}
Rectifier bridge is to seal the rectifier tube in a shell. Points full bridge and half bridge. The full bridge connects the four diodes of the connected bridge rectifier circuit together. The half bridge is half of four diode bridge rectifiers, and two half bridges can be used to form a bridge rectifier circuit. One half bridge can also be used to form a full-wave rectifier circuit with a center-tapped transformer. Select a rectifier bridge to consider. Rectifier circuit and operating voltage.
Bridge Rectifier,Original Bridge Rectifier,Full Bridge Rectifier ,Diodes Bridge Rectifier,Single Phase Rectifier Bridge, Three Phase Bridge Rectifier
YANGZHOU POSITIONING TECH CO., LTD. , https://www.pst-thyristor.com