Skip to content

Commit

Permalink
Update PMSM detailed model application (#17)
Browse files Browse the repository at this point in the history
* Update detailed PMSM parameter data and impacted files.
  • Loading branch information
isaacito12 authored Oct 11, 2023
1 parent def3a31 commit 9d3320b
Show file tree
Hide file tree
Showing 11 changed files with 565 additions and 261 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/jupyter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@

# Copyright 2021-2023 The MathWorks, Inc.

name: Create jupyter notebooks fom mlx
name: Create Jupyter notebooks from Live Scripts

on:
workflow_dispatch:

jobs:

job-generate-jupyter-files:
Expand All @@ -25,7 +26,6 @@ jobs:
# notebooks to the repository
contents: write


steps:

- name: Check out repository
Expand Down Expand Up @@ -64,4 +64,3 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: '*.ipynb'

Binary file not shown.
Binary file not shown.
Binary file not shown.
481 changes: 355 additions & 126 deletions DetailedModelApplications/MotorDrivePmsmFem/MotorDrive_testHarness.mdl

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions DetailedModelApplications/MotorPmsmFem/PmsmFemParams.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@

%% Electrical

% Load flux linkage data. The following script is included as an example in
% Simscape Electrical.
ee_ece_table
PmsmFem.NumPolePairs = N; % Number of pole pairs
% Load flux linkage data.
% This data was generated for a typical generic motor, not for a specific one.
load("PmsmFem_ParamData.mat")

PmsmFem.NumPolePairs = 4; % Number of pole pairs
PmsmFem.idVec_A = idVec; % Direct-asis current vector, iD
PmsmFem.iqVec_A = iqVec; % Quadrature-axis current vector, iQ
PmsmFem.angleVec_deg = angleVec; % Rotor angle vector, theta
PmsmFem.fluxD_Wb = fluxD; % D-axis flux linkage, Fd(iD,iQ,theta)
PmsmFem.fluxQ_Wb = fluxQ; % Q-axis flux linkage, Fq(iD,iQ,theta)
PmsmFem.torque_Nm = torque; % Torque matrix, T(iD,iQ,theta)
clear N idVec iqVec angleVec fluxD fluxQ torque flux0
PmsmFem.angleVec_deg = angleVec2; % Rotor angle vector, theta
PmsmFem.flux = flux2;
PmsmFem.torque_Nm = torque2; % Torque matrix, T(iD,iQ,theta)

clear idVec iqVec angleVec2 flux2 torque2

PmsmFem.Rs_Ohm = 0.07; % Stator resistance per phase, Rs

Expand Down
105 changes: 56 additions & 49 deletions DetailedModelApplications/MotorPmsmFem/PmsmFemRefSub.mdl

Large diffs are not rendered by default.

Binary file not shown.
208 changes: 134 additions & 74 deletions DetailedModelApplications/MotorPmsmFem/PmsmFem_testHarness.mdl

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design"/>
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="PmsmFem_ParamData.mat" type="File"/>

0 comments on commit 9d3320b

Please sign in to comment.