Download 3-Phase PM Synchronous Motor Vector Control Using
Transcript
Software Design • MB1 Motor-Brake SM40V + SG40N The application software is targeted for a PM Synchronous Motor with sinewave Back-EMF shape. In this demonstration application, a BLDC motor is used instead, due to the availability of the BLDC motor (MB1). Although the Back-EMF shape of this motor is not an ideal sinewave, it can be controlled by the application software. The drive parameters will be ideal, with a PMSM motor with an exact sinewave Back-EMF shape. Notes: A detailed description of the individual board can be found in the appropriate 56F80x Evaluation Module User’s Manual or 56F83xx Evaluation Module User Manual, or on the Freescale web site: www.freescale.com The Users Manual includes the schematic of the board, description of individual function blocks, and a bill of materials. The individual boards can be ordered from Freescale as standard products. 6. Software Design This section explains the software design for targeting a 56F83xxEVM and describes the design of the drive’s software blocks. The software description comprises these topics: • • • Main software flow chart Data flow State diagram For more information on the system blocks used, refer to Section 4.3. 6.1 Main Software Flow Chart The main software flow chart incorporates the Main routine entered from Reset (see Figure 6-1) and Interrupt states (see Figure 6-2, and Figure 6-3). The Main routine includes the initialization of the hybrid controller and the main loop. The software consist of processes: • • The Application Control process is the highest software level and precedes settings for other software levels. Inputs for this level are the RUN / STOP switch, UP / DOWN buttons for manual control, and PC master software (via the registers shown in Section 6.2). This process is handled by Application Control Processing called from Main; see Figure 6-1. The PM Synchronous Motor (PMSM) Control process provides most of the motor control functionality. It is split into: — Current Processing, which is called from ADC Complete Interrupt (see Figure 6-2) once per two PWM reloads, with a period 125µs. It can also be set to each PWM reload (62.5µs), but the PC master software recorder pcmasterdrvRecorder() must be removed from the code. — Speed Processing, which is called from the Quadrature Timer D0 Interrupt (see Figure 6-3) with the period PER_TMR_POS_SPEED_US (900µs). The advantage of splitting the current and the speed control processes is that current control can be executed with a high priority and frequency of calls, while the execution of the speed control is not that highly prioritized. • The Analog Sensing process handles sensing, filtering and correction of analog variables (phase currents, temperature, DCBus voltage). It is provided by Analog Sensing Processing (see Figure 6-2) 3-Phase PMSM Motor Vector Control, Rev. 3 34 Freescale Semiconductor Preliminary