Просмотр исходного кода

更新FOC_adrc.xls simulink 模型

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 3 лет назад
Родитель
Сommit
7fb261bd9d

BIN
Simulink/FIR.slx


BIN
Simulink/FIR.slxc


BIN
Simulink/FOC_ADRC.slx


+ 3 - 3
Simulink/Motor_A1_dq_t_data.m

@@ -27,10 +27,10 @@ Torque_Mode = 1;
 Speed_Mode = 2;
 Ctrl_Mode = Torque_Mode;
 %Simulink provider Motor parameters
-n_polePairs  = 4;        % [-] Number of motor pole pairs
+n_polePairs  = 5;        % [-] Number of motor pole pairs
 PM           = 0.01688;   % Permanent magnet flux linkage, 
-Ld           = 0.07e-3;% d-axis inductance, 
-Lq           = 0.178e-3; % q-axis inductance,
+Ld           = 0.45e-4;%0.07e-3;% d-axis inductance, 
+Lq           = 0.625e-4;%0.178e-3; % q-axis inductance,
 Rs           = 0.011;   % Stator resistance,
 J            = 0.03945; % Moment of inertia,
 bandwith     = 1600*2*pi;

BIN
Simulink/ee_asm_drive_sensor_control.slxc


BIN
Simulink/ee_motor_pmsm_drive.slxc


+ 0 - 34
Simulink/fdacoefs.h

@@ -1,34 +0,0 @@
-/*
- * Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool
- * Generated by MATLAB(R) 9.9 and Signal Processing Toolbox 8.5.
- * Generated on: 11-Oct-2022 16:55:54
- */
-
-/*
- * 离散时间 FIR 滤波器(实数)
- * ----------------
- * 滤波器结构  : 直接型 FIR
- * 滤波器长度  : 16
- * 稳定     : 是
- * 线性相位   : 是 (Type 2)
- */
-
-/* General type conversion for MATLAB generated C-code  */
-#include "tmwtypes.h"
-/* 
- * Expected path to tmwtypes.h 
- * D:\Program Files\R2020b\extern\include\tmwtypes.h 
- */
-/*
- * Warning - Filter coefficients were truncated to fit specified data type.  
- *   The resulting response may not match generated theoretical response.
- *   Use the Filter Design & Analysis Tool to design accurate
- *   single-precision filter coefficients.
- */
-const int BL = 16;
-const real32_T B[16] = {
-   0.007895005867,  0.01734124683,  0.03257999197,  0.05209516734,  0.07380001992,
-    0.09460353851,   0.1110314056,   0.1201113388,   0.1201113388,   0.1110314056,
-    0.09460353851,  0.07380001992,  0.05209516734,  0.03257999197,  0.01734124683,
-   0.007895005867
-};

BIN
Simulink/foc_libs.slx


+ 0 - 10
Simulink/myfilter.m

@@ -1,10 +0,0 @@
-Fir=Fir_angle;
-in=csvread('angle.csv');
-in=in';
-angle_off=filter(Fir.Numerator, 1, in);
-out=single(angle_off);
-t=0:3071;
-plot(t, in);
-hold;
-plot(t-477, out);
-out_off=out';

+ 0 - 12
Simulink/myfilter2.m

@@ -1,12 +0,0 @@
-Fir=Fir_angle2;
-in=csvread('angle5.csv');
-in=in';
-angle_off=filter(Fir.Numerator, 1, in);
-out=single(angle_off);
-t=0:3071;
-plot(t, in);
-hold;
-%plot(t-158, out);
-%plot(t-253, out);
-plot(t-277, out);
-out_off=out';

+ 0 - 12
Simulink/myfilter3.m

@@ -1,12 +0,0 @@
-Fir=Fir_angle3;
-in=csvread('angle5.csv');
-in=in';
-angle_off=filter(Fir.Numerator, 1, in);
-out=single(angle_off);
-t=0:3071;
-plot(t, in);
-hold;
-%plot(t-158, out);
-%plot(t-253, out);
-plot(t-226, out);
-out_off=out';