Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jun 11, 2024
1 parent eb6c48e commit cf3fd10
Show file tree
Hide file tree
Showing 161 changed files with 1,224 additions and 1,210 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ def i_s(psi_s):
# Configure the control system.

par = SynchronousMachinePars(n_p=2, R_s=.54, L_d=37e-3, L_q=6.2e-3, psi_f=0)
cfg = control.ObserverBasedVHzCtrlCfg(
cfg = control.ObserverBasedVHzControlCfg(
par, max_i_s=2*base.i, min_psi_s=base.psi, max_psi_s=base.psi)
ctrl = control.ObserverBasedVHzCtrl(par, cfg)
ctrl = control.ObserverBasedVHzControl(par, cfg)

# %%
# Set the speed reference and the external load torque.
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@

# Inverse-Γ model parameter estimates
par = mdl_ig_par # Assume accurate machine model parameter estimates
cfg = control.ObserverBasedVHzCtrlCfg(
cfg = control.ObserverBasedVHzControlCfg(
nom_psi_s=base.psi, max_i_s=1.5*base.i, slip_compensation=False)
ctrl = control.ObserverBasedVHzCtrl(par, cfg, T_s=250e-6)
ctrl = control.ObserverBasedVHzControl(par, cfg, T_s=250e-6)

# %%
# Set the speed reference.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@

par = mdl_par # Assume accurate machine model parameter estimates
cfg = control.CurrentReferenceCfg(par, nom_w_m=base.w, max_i_s=2*base.i)
ctrl = control.SignalInjectionCtrl(par, cfg, J=.015, T_s=250e-6)
# ctrl.current_ctrl = control.sm.CurrentCtrl(par, 2*np.pi*100)
ctrl = control.SignalInjectionControl(par, cfg, J=.015, T_s=250e-6)
# ctrl.current_ctrl = control.sm.CurrentControl(par, 2*np.pi*100)

# %%
# Set the speed reference and the external load torque.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def i_s(psi_s):
# Limit the maximum reference flux to the base value
cfg = control.FluxTorqueReferenceCfg(
par, max_i_s=2*base.i, k_u=1, max_psi_s=base.psi)
ctrl = control.FluxVectorCtrl(par, cfg, J=.015, sensorless=True)
ctrl = control.FluxVectorControl(par, cfg, J=.015, sensorless=True)
# Select a lower speed-estimation bandwidth to mitigate the saturation effects
ctrl.observer = control.Observer(
control.ObserverCfg(par, alpha_o=2*np.pi*40, sensorless=True))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@
# Control system (parametrized as open-loop V/Hz control).

par = InductionMachineInvGammaPars(R_s=0*3.7, R_R=0*2.1, L_sgm=.021, L_M=.224)
ctrl = control.VHzCtrl(
control.VHzCtrlCfg(par, nom_psi_s=base.psi, k_u=0, k_w=0, six_step=True))
ctrl = control.VHzControl(
control.VHzControlCfg(
par, nom_psi_s=base.psi, k_u=0, k_w=0, six_step=True))

# %%
# Set the speed reference and the external load torque.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"par = mdl_par # Assume accurate machine model parameter estimates\ncfg = control.FluxTorqueReferenceCfg(par, max_i_s=1.5*base.i, k_u=.9)\nctrl = control.FluxVectorCtrl(par, cfg, J=.015, T_s=250e-6, sensorless=True)"
"par = mdl_par # Assume accurate machine model parameter estimates\ncfg = control.FluxTorqueReferenceCfg(par, max_i_s=1.5*base.i, k_u=.9)\nctrl = control.FluxVectorControl(par, cfg, J=.015, T_s=250e-6, sensorless=True)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
},
"outputs": [],
"source": [
"par = SynchronousMachinePars(n_p=2, R_s=.2, L_d=4e-3, L_q=17e-3, psi_f=.134)\ncfg = control.ObserverBasedVHzCtrlCfg(par, max_i_s=2*base.i)\nctrl = control.ObserverBasedVHzCtrl(par, cfg, T_s=250e-6)"
"par = SynchronousMachinePars(n_p=2, R_s=.2, L_d=4e-3, L_q=17e-3, psi_f=.134)\ncfg = control.ObserverBasedVHzControlCfg(par, max_i_s=2*base.i)\nctrl = control.ObserverBasedVHzControl(par, cfg, T_s=250e-6)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
},
"outputs": [],
"source": [
"par = SynchronousMachinePars(n_p=2, R_s=.54, L_d=37e-3, L_q=6.2e-3, psi_f=0)\ncfg = control.ObserverBasedVHzCtrlCfg(\n par, max_i_s=2*base.i, min_psi_s=base.psi, max_psi_s=base.psi)\nctrl = control.ObserverBasedVHzCtrl(par, cfg)"
"par = SynchronousMachinePars(n_p=2, R_s=.54, L_d=37e-3, L_q=6.2e-3, psi_f=0)\ncfg = control.ObserverBasedVHzControlCfg(\n par, max_i_s=2*base.i, min_psi_s=base.psi, max_psi_s=base.psi)\nctrl = control.ObserverBasedVHzControl(par, cfg)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
# Configure the control system.

par = mdl_par # Assume accurate machine model parameter estimates
cfg = control.ObserverBasedVHzCtrlCfg(par, max_i_s=1.5*base.i)
ctrl = control.ObserverBasedVHzCtrl(par, cfg, T_s=250e-6)
cfg = control.ObserverBasedVHzControlCfg(par, max_i_s=1.5*base.i)
ctrl = control.ObserverBasedVHzControl(par, cfg, T_s=250e-6)
#ctrl.rate_limiter = control.RateLimiter(2*np.pi*120)

# %%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ def i_s(psi_s):
# Configure the control system.

par = SynchronousMachinePars(n_p=2, R_s=.2, L_d=4e-3, L_q=17e-3, psi_f=.134)
cfg = control.ObserverBasedVHzCtrlCfg(par, max_i_s=2*base.i)
ctrl = control.ObserverBasedVHzCtrl(par, cfg, T_s=250e-6)
cfg = control.ObserverBasedVHzControlCfg(par, max_i_s=2*base.i)
ctrl = control.ObserverBasedVHzControl(par, cfg, T_s=250e-6)

# %%
# Set the speed reference and the external load torque.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@

par = mdl_par # Assume accurate machine model parameter estimates
cfg = control.CurrentReferenceCfg(par, nom_w_m=base.w, max_i_s=1.5*base.i)
ctrl = control.CurrentVectorCtrl(par, cfg, J=.015, T_s=250e-6, sensorless=True)
ctrl = control.CurrentVectorControl(
par, cfg, J=.015, T_s=250e-6, sensorless=True)

# %%
# Set the speed reference and the external load torque.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

# Inverse-Γ model parameter estimates
par = InductionMachineInvGammaPars(R_s=0*3.7, R_R=0*2.1, L_sgm=.021, L_M=.224)
ctrl = control.VHzCtrl(
control.VHzCtrlCfg(par, nom_psi_s=base.psi, k_u=0, k_w=0))
ctrl = control.VHzControl(
control.VHzControlCfg(par, nom_psi_s=base.psi, k_u=0, k_w=0))

# %%
# Set the speed reference. The external load torque is zero (by default).
Expand Down Expand Up @@ -75,7 +75,7 @@
mdl.converter.data.u_cs.real/base.u,
label=r"$u_\mathrm{ca}$")
ax1.plot(
mdl.converter.data.t,
mdl.machine.data.t,
mdl.machine.data.u_ss.real/base.u,
label=r"$u_\mathrm{sa}$")
ax1.set_xlim(t_span)
Expand All @@ -88,7 +88,7 @@
mdl.converter.data.i_cs.real/base.i,
label=r"$i_\mathrm{ca}$")
ax2.plot(
mdl.converter.data.t,
mdl.machine.data.t,
mdl.machine.data.i_ss.real/base.i,
label=r"$i_\mathrm{sa}$")
ax2.set_xlim(t_span)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
par = mdl_par # Assume accurate machine model parameter estimates
cfg = control.CurrentReferenceCfg(
par, nom_w_m=base.w, max_i_s=1.5*base.i, min_psi_s=.5*base.psi, k_u=.9)
ctrl = control.CurrentVectorCtrl(par, cfg, J=.015, T_s=125e-6, sensorless=True)
ctrl = control.CurrentVectorControl(
par, cfg, J=.015, T_s=125e-6, sensorless=True)

# %%
# Set the speed reference and the external load torque.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"par = mdl_par # Assume accurate machine model parameter estimates\ncfg = control.ObserverBasedVHzCtrlCfg(par, max_i_s=1.5*base.i)\nctrl = control.ObserverBasedVHzCtrl(par, cfg, T_s=250e-6)\n#ctrl.rate_limiter = control.RateLimiter(2*np.pi*120)"
"par = mdl_par # Assume accurate machine model parameter estimates\ncfg = control.ObserverBasedVHzControlCfg(par, max_i_s=1.5*base.i)\nctrl = control.ObserverBasedVHzControl(par, cfg, T_s=250e-6)\n#ctrl.rate_limiter = control.RateLimiter(2*np.pi*120)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"par = mdl_par # Assume accurate machine model parameter estimates\ncfg = control.CurrentReferenceCfg(par, nom_w_m=base.w, max_i_s=2*base.i)\nctrl = control.SignalInjectionCtrl(par, cfg, J=.015, T_s=250e-6)\n# ctrl.current_ctrl = control.sm.CurrentCtrl(par, 2*np.pi*100)"
"par = mdl_par # Assume accurate machine model parameter estimates\ncfg = control.CurrentReferenceCfg(par, nom_w_m=base.w, max_i_s=2*base.i)\nctrl = control.SignalInjectionControl(par, cfg, J=.015, T_s=250e-6)\n# ctrl.current_ctrl = control.sm.CurrentControl(par, 2*np.pi*100)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

par = mdl_par # Assume accurate machine model parameter estimates
cfg = control.FluxTorqueReferenceCfg(par, max_i_s=1.5*base.i, k_u=.9)
ctrl = control.FluxVectorCtrl(par, cfg, J=.015, T_s=250e-6, sensorless=True)
ctrl = control.FluxVectorControl(par, cfg, J=.015, T_s=250e-6, sensorless=True)

# %%
# Set the speed reference and the external load torque.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
},
"outputs": [],
"source": [
"# Control system is based on the constant inductances\npar = SynchronousMachinePars(n_p=2, R_s=.63, L_d=18e-3, L_q=110e-3, psi_f=.47)\n# Limit the maximum reference flux to the base value\ncfg = control.FluxTorqueReferenceCfg(\n par, max_i_s=2*base.i, k_u=1, max_psi_s=base.psi)\nctrl = control.FluxVectorCtrl(par, cfg, J=.015, sensorless=True)\n# Select a lower speed-estimation bandwidth to mitigate the saturation effects\nctrl.observer = control.Observer(\n control.ObserverCfg(par, alpha_o=2*np.pi*40, sensorless=True))"
"# Control system is based on the constant inductances\npar = SynchronousMachinePars(n_p=2, R_s=.63, L_d=18e-3, L_q=110e-3, psi_f=.47)\n# Limit the maximum reference flux to the base value\ncfg = control.FluxTorqueReferenceCfg(\n par, max_i_s=2*base.i, k_u=1, max_psi_s=base.psi)\nctrl = control.FluxVectorControl(par, cfg, J=.015, sensorless=True)\n# Select a lower speed-estimation bandwidth to mitigate the saturation effects\nctrl.observer = control.Observer(\n control.ObserverCfg(par, alpha_o=2*np.pi*40, sensorless=True))"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"# Inverse-\u0393 model parameter estimates\npar = mdl_ig_par # Assume accurate machine model parameter estimates\ncfg = control.ObserverBasedVHzCtrlCfg(\n nom_psi_s=base.psi, max_i_s=1.5*base.i, slip_compensation=False)\nctrl = control.ObserverBasedVHzCtrl(par, cfg, T_s=250e-6)"
"# Inverse-\u0393 model parameter estimates\npar = mdl_ig_par # Assume accurate machine model parameter estimates\ncfg = control.ObserverBasedVHzControlCfg(\n nom_psi_s=base.psi, max_i_s=1.5*base.i, slip_compensation=False)\nctrl = control.ObserverBasedVHzControl(par, cfg, T_s=250e-6)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ def L_s(psi, L_su=.34, beta=.84, S=7):
cfg = control.CurrentReferenceCfg(
par, max_i_s=1.5*base.i, nom_u_s=base.u, nom_w_s=base.w)
# Create the control system
ctrl = control.CurrentVectorCtrl(par, cfg, J=.015, T_s=250e-6, sensorless=True)
ctrl = control.CurrentVectorControl(
par, cfg, J=.015, T_s=250e-6, sensorless=True)
# As an example, you may replace the default 2DOF PI speed controller with the
# regular PI speed controller by uncommenting the following line
# from motulator.common.control import PICtrl
# ctrl.speed_ctrl = PICtrl(k_p=1, k_i=1)
# from motulator.common.control import PIController
# ctrl.speed_ctrl = PIController(k_p=1, k_i=1)

# %%
# Set the speed reference and the external load torque. You may also try to
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"par = mdl_par # Assume accurate machine model parameter estimates\ncfg = control.CurrentReferenceCfg(par, nom_w_m=base.w, max_i_s=1.5*base.i)\nctrl = control.CurrentVectorCtrl(par, cfg, J=.015, T_s=250e-6, sensorless=True)"
"par = mdl_par # Assume accurate machine model parameter estimates\ncfg = control.CurrentReferenceCfg(par, nom_w_m=base.w, max_i_s=1.5*base.i)\nctrl = control.CurrentVectorControl(\n par, cfg, J=.015, T_s=250e-6, sensorless=True)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"par = InductionMachineInvGammaPars(R_s=0*3.7, R_R=0*2.1, L_sgm=.021, L_M=.224)\nctrl = control.VHzCtrl(\n control.VHzCtrlCfg(par, nom_psi_s=base.psi, k_u=0, k_w=0, six_step=True))"
"par = InductionMachineInvGammaPars(R_s=0*3.7, R_R=0*2.1, L_sgm=.021, L_M=.224)\nctrl = control.VHzControl(\n control.VHzControlCfg(\n par, nom_psi_s=base.psi, k_u=0, k_w=0, six_step=True))"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
},
"outputs": [],
"source": [
"# Machine model parameter estimates\npar = InductionMachineInvGammaPars(\n n_p=2, R_s=3.7, R_R=2.1, L_sgm=.021, L_M=.224)\n# Set nominal values and limits for reference generation\ncfg = control.CurrentReferenceCfg(\n par, max_i_s=1.5*base.i, nom_u_s=base.u, nom_w_s=base.w)\n# Create the control system\nctrl = control.CurrentVectorCtrl(par, cfg, J=.015, T_s=250e-6, sensorless=True)\n# As an example, you may replace the default 2DOF PI speed controller with the\n# regular PI speed controller by uncommenting the following line\n# from motulator.common.control import PICtrl\n# ctrl.speed_ctrl = PICtrl(k_p=1, k_i=1)"
"# Machine model parameter estimates\npar = InductionMachineInvGammaPars(\n n_p=2, R_s=3.7, R_R=2.1, L_sgm=.021, L_M=.224)\n# Set nominal values and limits for reference generation\ncfg = control.CurrentReferenceCfg(\n par, max_i_s=1.5*base.i, nom_u_s=base.u, nom_w_s=base.w)\n# Create the control system\nctrl = control.CurrentVectorControl(\n par, cfg, J=.015, T_s=250e-6, sensorless=True)\n# As an example, you may replace the default 2DOF PI speed controller with the\n# regular PI speed controller by uncommenting the following line\n# from motulator.common.control import PIController\n# ctrl.speed_ctrl = PIController(k_p=1, k_i=1)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"par = mdl_par # Assume accurate machine model parameter estimates\ncfg = control.ObserverBasedVHzCtrlCfg(par, max_i_s=1.5*base.i)\nctrl = control.ObserverBasedVHzCtrl(par, cfg, T_s=250e-6)\n#ctrl.rate_limiter = control.RateLimiter(2*np.pi*120)"
"par = mdl_par # Assume accurate machine model parameter estimates\ncfg = control.ObserverBasedVHzControlCfg(par, max_i_s=1.5*base.i)\nctrl = control.ObserverBasedVHzControl(par, cfg, T_s=250e-6)\n#ctrl.rate_limiter = control.RateLimiter(2*np.pi*120)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"# Inverse-\u0393 model parameter estimates\npar = InductionMachineInvGammaPars(R_s=0*3.7, R_R=0*2.1, L_sgm=.021, L_M=.224)\nctrl = control.VHzCtrl(\n control.VHzCtrlCfg(par, nom_psi_s=base.psi, k_u=0, k_w=0))"
"# Inverse-\u0393 model parameter estimates\npar = InductionMachineInvGammaPars(R_s=0*3.7, R_R=0*2.1, L_sgm=.021, L_M=.224)\nctrl = control.VHzControl(\n control.VHzControlCfg(par, nom_psi_s=base.psi, k_u=0, k_w=0))"
]
},
{
Expand Down Expand Up @@ -141,7 +141,7 @@
},
"outputs": [],
"source": [
"t_span = (1.1, 1.125) # Time span for the zoomed-in plot\nmdl = sim.mdl # Continuous-time data\n# Plot the converter and stator voltages (phase a)\nfig1, (ax1, ax2) = plt.subplots(2, 1)\nax1.plot(\n mdl.converter.data.t,\n mdl.converter.data.u_cs.real/base.u,\n label=r\"$u_\\mathrm{ca}$\")\nax1.plot(\n mdl.converter.data.t,\n mdl.machine.data.u_ss.real/base.u,\n label=r\"$u_\\mathrm{sa}$\")\nax1.set_xlim(t_span)\nax1.legend()\nax1.set_xticklabels([])\nax1.set_ylabel(\"Voltage (p.u.)\")\n# Plot the converter and stator currents (phase a)\nax2.plot(\n mdl.converter.data.t,\n mdl.converter.data.i_cs.real/base.i,\n label=r\"$i_\\mathrm{ca}$\")\nax2.plot(\n mdl.converter.data.t,\n mdl.machine.data.i_ss.real/base.i,\n label=r\"$i_\\mathrm{sa}$\")\nax2.set_xlim(t_span)\nax2.legend()\nax2.set_ylabel(\"Current (p.u.)\")\nax2.set_xlabel(\"Time (s)\")\n\nplt.tight_layout()\nplt.show()"
"t_span = (1.1, 1.125) # Time span for the zoomed-in plot\nmdl = sim.mdl # Continuous-time data\n# Plot the converter and stator voltages (phase a)\nfig1, (ax1, ax2) = plt.subplots(2, 1)\nax1.plot(\n mdl.converter.data.t,\n mdl.converter.data.u_cs.real/base.u,\n label=r\"$u_\\mathrm{ca}$\")\nax1.plot(\n mdl.machine.data.t,\n mdl.machine.data.u_ss.real/base.u,\n label=r\"$u_\\mathrm{sa}$\")\nax1.set_xlim(t_span)\nax1.legend()\nax1.set_xticklabels([])\nax1.set_ylabel(\"Voltage (p.u.)\")\n# Plot the converter and stator currents (phase a)\nax2.plot(\n mdl.converter.data.t,\n mdl.converter.data.i_cs.real/base.i,\n label=r\"$i_\\mathrm{ca}$\")\nax2.plot(\n mdl.machine.data.t,\n mdl.machine.data.i_ss.real/base.i,\n label=r\"$i_\\mathrm{sa}$\")\nax2.set_xlim(t_span)\nax2.legend()\nax2.set_ylabel(\"Current (p.u.)\")\nax2.set_xlabel(\"Time (s)\")\n\nplt.tight_layout()\nplt.show()"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"par = mdl_par # Assume accurate machine model parameter estimates\ncfg = control.CurrentReferenceCfg(\n par, nom_w_m=base.w, max_i_s=2*base.i, k_u=.9)\nctrl = control.CurrentVectorCtrl(\n par, cfg, T_s=125e-6, J=.0042, sensorless=True)\nctrl.observer = control.Observer(\n control.ObserverCfg(par, sensorless=True, alpha_o=2*np.pi*200))\nctrl.speed_ctrl = control.SpeedCtrl(\n J=.0042, alpha_s=2*np.pi*4, max_tau_M=1.5*nom.tau)"
"par = mdl_par # Assume accurate machine model parameter estimates\ncfg = control.CurrentReferenceCfg(\n par, nom_w_m=base.w, max_i_s=2*base.i, k_u=.9)\nctrl = control.CurrentVectorControl(\n par, cfg, T_s=125e-6, J=.0042, sensorless=True)\nctrl.observer = control.Observer(\n control.ObserverCfg(par, sensorless=True, alpha_o=2*np.pi*200))\nctrl.speed_ctrl = control.SpeedController(\n J=.0042, alpha_s=2*np.pi*4, max_tau_M=1.5*nom.tau)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@

par = mdl_par # Assume accurate machine model parameter estimates
ref = control.CurrentReferenceCfg(par, nom_w_m=base.w, max_i_s=1.5*base.i)
ctrl = control.CurrentVectorCtrl(par, ref, J=.015, T_s=250e-6, sensorless=True)
ctrl = control.CurrentVectorControl(
par, ref, J=.015, T_s=250e-6, sensorless=True)

# %%
# Set the speed reference and the external load torque.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
par = mdl_par # Assume accurate machine model parameter estimates
cfg = control.CurrentReferenceCfg(
par, nom_w_m=base.w, max_i_s=2*base.i, k_u=.9)
ctrl = control.CurrentVectorCtrl(
ctrl = control.CurrentVectorControl(
par, cfg, T_s=125e-6, J=.0042, sensorless=True)
ctrl.observer = control.Observer(
control.ObserverCfg(par, sensorless=True, alpha_o=2*np.pi*200))
ctrl.speed_ctrl = control.SpeedCtrl(
ctrl.speed_ctrl = control.SpeedController(
J=.0042, alpha_s=2*np.pi*4, max_tau_M=1.5*nom.tau)

# %%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"# Inverse-\u0393 model parameter estimates\npar = InductionMachineInvGammaPars(R_s=0*3.7, R_R=0*2.1, L_sgm=.021, L_M=.224)\nctrl = control.VHzCtrl(\n control.VHzCtrlCfg(par, nom_psi_s=base.psi, k_u=0, k_w=0))"
"# Inverse-\u0393 model parameter estimates\npar = InductionMachineInvGammaPars(R_s=0*3.7, R_R=0*2.1, L_sgm=.021, L_M=.224)\nctrl = control.VHzControl(\n control.VHzControlCfg(par, nom_psi_s=base.psi, k_u=0, k_w=0))"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"par = mdl_par # Assume accurate machine model parameter estimates\nref = control.CurrentReferenceCfg(par, nom_w_m=base.w, max_i_s=1.5*base.i)\nctrl = control.CurrentVectorCtrl(par, ref, J=.015, T_s=250e-6, sensorless=True)"
"par = mdl_par # Assume accurate machine model parameter estimates\nref = control.CurrentReferenceCfg(par, nom_w_m=base.w, max_i_s=1.5*base.i)\nctrl = control.CurrentVectorControl(\n par, ref, J=.015, T_s=250e-6, sensorless=True)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
cfg = control.CurrentReferenceCfg(
par, max_i_s=1.5*base.i, nom_u_s=base.u, nom_w_s=base.w)
# Create the control system
ctrl = control.CurrentVectorCtrl(par, cfg, T_s=250e-6, sensorless=True)
ctrl = control.CurrentVectorControl(par, cfg, T_s=250e-6, sensorless=True)

# %%
# Set the torque reference and the actual speed.
Expand Down
Loading

0 comments on commit cf3fd10

Please sign in to comment.