Skip to content

Commit a87f8bc

Browse files
authored
Minor fixes in docstrings (#182)
1 parent 93301a9 commit a87f8bc

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

motulator/common/utils/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def from_nominal(cls, nom: NominalValues, n_p: int | None = None) -> "BaseValues
248248
f : float
249249
Frequency (Hz).
250250
n_p : int | None, optional
251-
Number of pole pairs, default to None.
251+
Number of pole pairs, defaults to None.
252252
253253
Returns
254254
-------

motulator/drive/control/_im_flux_vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ class FluxVectorController:
274274
cfg : FluxVectorControllerCfg
275275
Flux-vector control configuration.
276276
sensorless : bool, optional
277-
If True, sensorless control is used, default to True.
277+
If True, sensorless control is used, defaults to True.
278278
T_s : float, optional
279279
Sampling period (s), defaults to 125e-6.
280280

motulator/drive/control/_im_observers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def compute_output(
150150
)
151151
num = (v_s + k_o1 * (v_r - v_s) + k_o2 * (v_r - v_s).conjugate()).imag
152152
out.w_s = num / den if den > 0 else w_m
153-
out.w_r = self.par.R_R * out.i_s.imag / out.psi_R if out.psi_R > 0 else 0
153+
out.w_r = par.R_R * out.i_s.imag / out.psi_R if out.psi_R > 0 else 0
154154
out.w_m = w_m
155155
out.w_M = w_m / par.n_p
156156

@@ -234,8 +234,8 @@ def create_sensored_observer(
234234
par : InductionMachineInvGammaPars
235235
Machine model parameters.
236236
k_o : Callable[[float], complex], optional
237-
Observer gain as a function of the rotor angular speed, default to ``lambda w_m:
238-
1 + 0.2*abs(w_m)/(R_R/L_M - 1j*w_m)``.
237+
Observer gain as a function of the rotor angular speed, defaults to
238+
``lambda w_m: 1 + 0.2*abs(w_m)/(R_R/L_M - 1j*w_m)``.
239239
240240
"""
241241
alpha = par.R_R / par.L_M

motulator/drive/control/_sm_current_vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class CurrentVectorControllerCfg:
9393
alpha_c : float, optional
9494
Current-control bandwidth (rad/s), defaults to 2*pi*200.
9595
alpha_i : float, optional
96-
Current-control integral-action bandwidth (rad/s), default to `alpha_c`.
96+
Current-control integral-action bandwidth (rad/s), defaults to `alpha_c`.
9797
alpha_o : float, optional
9898
Speed estimation bandwidth (rad/s), defaults to 2*pi*100.
9999
k_o : Callable[[float], float], optional

motulator/drive/control/_sm_observers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ def create_sensorless_observer(
295295
w_m: 0.25*(R_s*(L_d + L_q)/(L_d*L_q) + 0.2*abs(w_m))`` if `sensorless` else
296296
``lambda w_m: 2*pi*15``.
297297
k_f : Callable[[float], float], optional
298-
PM-flux estimation gain (V) as a function of the rotor angular speed, default to
299-
zero, ``lambda w_m: 0``. A typical nonzero gain is of the form ``lambda w_m:
298+
PM-flux estimation gain (V) as a function of the rotor angular speed, defaults
299+
to zero, ``lambda w_m: 0``. A typical nonzero gain is of the form ``lambda w_m:
300300
max(k*(abs(w_m) - w_min), 0)``, i.e., zero below the speed `w_min` (rad/s) and
301301
linearly increasing above that with the slope `k` (Vs).
302302

0 commit comments

Comments
 (0)