Source: DC Motor Drive PWM frequency
1, there is no unified standard, in fact, the frequency of PWM and your motor inductance and you need the speed response time has a great relationship. The general motor with 14K is enough. Of course, since the need for a simple speed adjustment can be casually selected. If the motor speed is relatively high, inductance is relatively small, you can use a relatively high frequency. Generally best not to exceed 20K because the general igbt up to 20K switching frequency. The MoS switching frequency is relatively high, but the high F requires a dedicated drive circuit, otherwise MOS work in the amplification area longer. If the motor speed is relatively low, inductance relatively large, but also in the servo, the switching frequency needs a little lower. 2, for motor applications, the greater the power, the lower the PWM frequency, the lowest 500Hz or 1KHz, in the megawatt-level applications. Normal small and medium power, 5K to 20K Common, the lower the power, the lower the voltage level, you can use the higher the PWM frequency. Because low-voltage MOSFET switching frequency can be very high, and high-voltage IGBT is difficult to quickly switch. Normal motors, 10K to 20K, no problem. We do kw class main inverter, switching frequency 10K.
/*PWM Speed Control program of ======= DC motor ========*/ /*Wei Dong Studio robots51.51.net June 2006*/ /*The crystal oscillator is 11.0592M and the PWM frequency is approximately 91Hz*/#include<reg51.h>#include<math.h>#defineUchar unsigned char#defineUINT unsigned intsbit en1=p1^0;/*L298 's Enable a*/sbit en2=p1^1;/*L298 's Enable B*/sbit S1=p1^2;/*input 1 of L298*/sbit S2=p1^3;/*input 2 of L298*/sbit S3=p1^4;/*input 3 of L298*/Sbit S4=p1^5;/*input 4 of L298*/Uchar T=0;/*Interrupt Counter*/Uchar M1=0;/*Motor 1 Speed value*/uchar m2=0;/*Motor 2 speed value*/Uchar TMP1,TMP2; /*Current speed value of the motor*/ /*Motor control function index-motor number, speed-motor speed ( -100-100)*/<span style="Color:rgb (255, 0, 0);">voidMotor (UCHAR Index,CharSpeed) </span> { if(speed>=- -&& speed= -) { if(index==1)/*Treatment of Motor 1*/{M1=abs (speed);/*the absolute value of the fetch speed*/ if(speed<0)/*The velocity value is negative and the reversal*/{S1=0; S2=1; } Else /*not a negative number is a positive turn*/{S1=1; S2=0; } } if(index==2)/*Treatment of Motor 2*/{m2=abs (speed);/*speed control of Motor 2*/ if(speed<0)/*direction control of Motor 2*/{S3=0; S4=1; } Else{S3=1; S4=0; } } } } voidDelayUINTJ/*Simple delay function*/ { for(j;j>0; j--); } voidMain () {Uchar I; Tmod=0x02;/*set the operating mode of the T0 to 2*/TH0=0x9b;/*initial value of the loading timer*/TL0=0x9b; EA=1;/*Open Interrupt*/ET0=1;/*Timer 0 interrupts allowed*/TR0=1;/*Start Timer 0*/ while(1)/*Motor Actual Control demo*/ { for(i=0; i= -; i++)/*Positive Turn Acceleration*/{Motor (1, i); Motor (2, i); Delay ( the); } for(i= -;i>0; i--)/*Positive turn deceleration*/{Motor (1, i); Motor (2, i); Delay ( the); } for(i=0; i= -; i++)/*Reverse Acceleration*/{Motor (1,-i); Motor (2,-i); Delay ( the); } for(i= -;i>0; i--)/*Reverse Deceleration*/{Motor (1,-i); Motor (2,-i); Delay ( the); } } } voidTIMER0 () Interrupt1 /*T0 Interrupt Service Program*/ { if(t==0)/*<span style= "Color:rgb (255, 0, 0); > 1 PWM cycles after completion (100 interrupts) will not accept the new values </span>*/{TMP1=M1; TMP2=m2; } if(T<TMP1) en1=1;Elseen1=0;/*<span style= "Color:rgb (255, 0, 0); > generates a PWM signal for motor 1, [0,TMP1=M1] is high level </span>*/ if(T<TMP2) en2=1;ElseEn2=0;/*generates a PWM signal of 2 of the motor, similarly*/T++; if(t>= -) t=0;/*<span style= "Color:rgb (255, 0, 0); > 1 PWM signals generated by 100 interrupts </span>*/ }
DC Motor Drive PWM frequency (RPM)