Permanent magnet synchronous motors have the advantages of small size, low moment of inertia, and simple structure, and are widely used in control systems. However, in actual applications, the control system will be affected by external factors such as high temperature and load, and the parameters of the permanent magnet synchronous motor such as inductance and rotor flux will change, causing system oscillation and affecting the actual control effect.
Therefore, accurate parameter identification is a necessary condition for achieving better control effect. At present, the commonly used motor parameter identification methods are: Kalman filter algorithm, least squares method, genetic algorithm, particle swarm algorithm, etc. Considering the advantages of the least squares method, which is simple in structure and easy to implement, this paper adopts the permanent magnet synchronous motor parameter identification method based on the least squares method. Based on the derivation of permanent magnet synchronous motor, the stator voltage and other measurable variables are used as input and output to identify the stator resistance and d and q axis armature inductance of the motor.
1. Least Squares Method
The least squares parameter identification method can solve the problems of linear time-varying systems, linear steady-state systems, linear systems with noise, etc. Common least squares methods include: recursive least squares method, forgetting factor recursive least squares method, corrected compensation least squares method, etc. These methods can all be used in system parameter identification.
2. Establishment of identification model
The permanent magnet synchronous motor is a nonlinear multivariable system. The voltage equation in d, q rotating coordinates is:
Where iq and id are the currents of q and d respectively; uq and ud are the voltages of q and d respectively; Rs, Lq, Ld are the resistance of the stator winding and the inductance of the q and d axes respectively; Ψq and Ψd are the components of the q and d magnetic flux respectively; ω is the electrical angular velocity of the rotor.
Modify the above formula into the expression of least squares method:
3. Simulation experiment
The parameter identification module written by S function is added to the permanent magnet synchronous motor control system model for simulation experiments.
function [sys,x0,str,ts]=mdlInitializeSizes %System initialization
sizes = simsizes;
sizes.NumContStates = 0; %Set the variables of the system continuous state
sizes.NumDiscStates = 0; %Set the variables of the system discrete state
sizes.NumOutputs = 1; %Set the system output variables
sizes.NumInputs = 3; %Set system input variables
sizes.DirFeedthrough = 1; % If the input variable u is explicitly included in the output equation, this parameter should be set to 1, and the input is not directly passed to the output port
sizes.NumSampleTimes = 1; % Number of module sampling cycles
% Required sample time, usually 1.
% guess that if it is n, then the state at the next moment needs to know the system state of the previous n states
sys = simsizes(sizes);
x0 = []; % System initial state variables
str = []; % Reserve the variable and keep it empty
ts = [-1 0]; % Sampling time [t1 t2] t1 is the sampling period. If t1=-1, the sampling period of the input signal will be inherited; parameter t2 is the offset, which is generally taken as 0
global P_past2 theta_past2
P_past2 = 1e4 * eye(2,2); %Usually 1e4 - 1e10
theta_past2 = [0.0001; 0.0001]; % Generally take a very small positive real vector
function sys=mdlOutputs(t,x,u) %Generate (transmit) system output
%Determination of initial value
lambda = 0.99; %Forgetting factor 0-1
global P_past2 theta_past2
xt = [u(1) u(2)]; %1*2 fait
y = u(3);
I = [1 0;0 1];
K = P_past2*xt'/(lambda + xt * P_past2*xt'); %2*1
P_new = 1/lambda*(I - K*xt) * P_past2; %2*2
theta_new = theta_past2 + K*(y-xt*theta_past2); %2*1
P_past2 = P_new ;
theta_past2 = theta_new;
sys(1) = theta_new(1);
function [sys,x0,str,ts] = Synchronous_demarcate(t,x,u,flag)
%This program is to identify the motor parameters stator resistance Rs, permanent magnet flux faif, dq axis inductance L
switch flag
case 0 % Initialization
[sys,x0,str,ts]=mdlInitializeSizes;
case 2 % Discrete state calculation, next simulation time, termination simulation setting
sys=[];%mdlUpdates(t,x,u);
Case 3 % Output signal calculation
sys = mdlOutputs(t,x,u);
case {1,4,9} % output signal calculation
sys=[];
otherwise
DAStudio.error('Simulink:blocks:unhandledFlag', num2str(flag));
end
function [sys,x0,str,ts]=mdlInitializeSizes %System initialization
sizes = simsizes;
sizes.NumContStates = 0; %Set the variables of the system continuous state
sizes.NumDiscStates = 0; %Set the variables of the system discrete state
sizes.NumOutputs = 3; %Set the system output variables
sizes.NumInputs = 5; %Set system input variables
sizes.DirFeedthrough = 1; % If the input variable u is explicitly included in the output equation, this parameter should be set to 1, and the input is not directly passed to the output port
sizes.NumSampleTimes = 1; % Number of module sampling cycles
% Required sample time, usually 1.
% guess that if it is n, then the state at the next moment needs to know the system state of the previous n states
sys = simsizes(sizes);
x0 = []; % System initial state variables
str = []; % Reserve the variable and keep it empty
ts = [0 0]; % Sampling time [t1 t2] t1 is the sampling period. If t1=-1, the sampling period of the input signal will be inherited; parameter t2 is the offset, which is generally taken as 0
global P_past theta_past
P_past = 1e4 * eye(3,3);
theta_past = [0;0;10000];
function sys=mdlOutputs(t,x,u) %Generate (transmit) system output
%Determination of initial value
lambda = 1; % forgetting factor, choose not to forget 0.8~1
global P_past theta_past
Moment of inertia parameter identification results:
Electromagnetic inductance parameter identification results:
Electrical angular velocity observations:
Load observation results:
Three-phase current observation results:
The simulation results show that the parameter identification algorithm using the recursive least squares method can accurately identify the electromagnetic parameters of the motor, can well follow the changes in the motor parameters, and has fast convergence and good identification results.
Previous article:Overview of the advantages and disadvantages of the PID algorithm and the three PID control components
Next article:Control method of two-phase induction servo motor
- Popular Resources
- Popular amplifiers
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- ASML predicts that its revenue in 2030 will exceed 457 billion yuan! Gross profit margin 56-60%
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- Award-winning live broadcast: Microchip&avnet series live broadcast second collection
- Redefining the retail experience: Four opportunities for RF technology
- Thank you for being here
- Tuya Sandwich Wi-Fi & BLE SoC NANO Main Control Board WBRU Zero Code Development IoT Fan
- #The best content of the "Interview with famous teachers" in the Electronics Competition#The third issue - Professor Li Yubai of the University of Electronic Science and Technology of China
- #idlemarket# MM32 development board exchange open source development board
- Since the signal that needs to be sampled is 0.01uA-10uA, is there any low-voltage MOS with Ids leakage current in nA or pA level?
- The principle and method of generating multiple PWM waveforms using one timer
- Installation and sound source localization algorithm of a diamond microphone array
- How to start the design of adjustable voltage regulated power supply application