API Reference¶
system_design.frequencyResponseTool.cli¶
Command-line interface for system_design.frequencyResponseTool.
The CLI preserves the original one-shot frequency-response workflow while
adding a sphinx-skel helper for generating a conservative, GitHub Pages
friendly Sphinx documentation skeleton.
Historical usage still works:
python -m system_design.frequencyResponseTool.cli --T 0.1 --gz-num "1" --gz-den "1 -0.8"
The explicit subcommand form is also supported:
python -m system_design.frequencyResponseTool.cli run --T 0.1 --gz-num "1" --gz-den "1 -0.8"
python -m system_design.frequencyResponseTool.cli sphinx-skel docs/frequencyResponseTool --force
system_design.frequencyResponseTool.apis¶
- class system_design.frequencyResponseTool.apis.LagLeadParams(K: 'float', beta: 'float', tau_lag: 'float', alpha: 'float', tau_lead: 'float')[source]¶
Bases:
object- Parameters:
K (float)
beta (float)
tau_lag (float)
alpha (float)
tau_lead (float)
- K: float¶
- alpha: float¶
- beta: float¶
- tau_lag: float¶
- tau_lead: float¶
- class system_design.frequencyResponseTool.apis.LagParams(K: 'float', beta: 'float', tau: 'float')[source]¶
Bases:
object- Parameters:
K (float)
beta (float)
tau (float)
- K: float¶
- beta: float¶
- tau: float¶
- class system_design.frequencyResponseTool.apis.LeadParams(K: 'float', alpha: 'float', tau: 'float')[source]¶
Bases:
object- Parameters:
K (float)
alpha (float)
tau (float)
- K: float¶
- alpha: float¶
- tau: float¶
- class system_design.frequencyResponseTool.apis.Margins(nu_gc: 'Optional[float]', nu_pc: 'Optional[float]', pm_deg: 'Optional[float]', gm_db: 'Optional[float]')[source]¶
Bases:
object- Parameters:
nu_gc (float | None)
nu_pc (float | None)
pm_deg (float | None)
gm_db (float | None)
- gm_db: float | None¶
- nu_gc: float | None¶
- nu_pc: float | None¶
- pm_deg: float | None¶
- class system_design.frequencyResponseTool.apis.RunFiles(path: 'str', desc: 'str')[source]¶
Bases:
object- Parameters:
path (str)
desc (str)
- desc: str¶
- path: str¶
- class system_design.frequencyResponseTool.apis.RunRequest(T: 'float', gz_num_desc: 'List[float]', gz_den_desc: 'List[float]', mode: 'str', lead: 'Optional[LeadParams]' = None, lag: 'Optional[LagParams]' = None, laglead: 'Optional[LagLeadParams]' = None, pm_req: 'float' = 50.0, gm_req: 'float' = 10.0, Kv_req: 'float' = 2.0, use_mpl: 'bool' = False, save_mpl: 'bool' = False, use_plotly: 'bool' = True, plotly_fmt: 'str' = 'html', step_N: 'int' = 0, out_dir: 'str' = 'out')[source]¶
Bases:
object- Parameters:
T (float)
gz_num_desc (List[float])
gz_den_desc (List[float])
mode (str)
lead (LeadParams | None)
lag (LagParams | None)
laglead (LagLeadParams | None)
pm_req (float)
gm_req (float)
Kv_req (float)
use_mpl (bool)
save_mpl (bool)
use_plotly (bool)
plotly_fmt (str)
step_N (int)
out_dir (str)
- Kv_req: float = 2.0¶
- T: float¶
- gm_req: float = 10.0¶
- gz_den_desc: List[float]¶
- gz_num_desc: List[float]¶
- laglead: LagLeadParams | None = None¶
- lead: LeadParams | None = None¶
- mode: str¶
- out_dir: str = 'out'¶
- plotly_fmt: str = 'html'¶
- pm_req: float = 50.0¶
- save_mpl: bool = False¶
- step_N: int = 0¶
- use_mpl: bool = False¶
- use_plotly: bool = True¶
- class system_design.frequencyResponseTool.apis.RunResult(Gd_w_num_asc: 'List[float]', Gd_w_den_asc: 'List[float]', Gd_z_num_desc: 'List[float]', Gd_z_den_desc: 'List[float]', L_num_desc: 'List[float]', L_den_desc: 'List[float]', CL_num_desc: 'List[float]', CL_den_desc: 'List[float]', margins: 'Margins', files: 'List[RunFiles]' = <factory>)[source]¶
Bases:
object- Parameters:
- CL_den_desc: List[float]¶
- CL_num_desc: List[float]¶
- Gd_w_den_asc: List[float]¶
- Gd_w_num_asc: List[float]¶
- Gd_z_den_desc: List[float]¶
- Gd_z_num_desc: List[float]¶
- L_den_desc: List[float]¶
- L_num_desc: List[float]¶
system_design.frequencyResponseTool.io¶
system_design.frequencyResponseTool.app¶
system_design.frequencyResponseTool.core¶
- class system_design.frequencyResponseTool.core.Lag(K: 'float', beta: 'float', tau: 'float')[source]¶
Bases:
object- Parameters:
K (float)
beta (float)
tau (float)
- K: float¶
- beta: float¶
- tau: float¶
- class system_design.frequencyResponseTool.core.LagLead(K: 'float', beta: 'float', tau_lag: 'float', alpha: 'float', tau_lead: 'float')[source]¶
Bases:
object- Parameters:
K (float)
beta (float)
tau_lag (float)
alpha (float)
tau_lead (float)
- K: float¶
- alpha: float¶
- beta: float¶
- tau_lag: float¶
- tau_lead: float¶
- class system_design.frequencyResponseTool.core.Lead(K: 'float', alpha: 'float', tau: 'float')[source]¶
Bases:
object- Parameters:
K (float)
alpha (float)
tau (float)
- K: float¶
- alpha: float¶
- tau: float¶
- system_design.frequencyResponseTool.core.auto_lead(Gw_num, Gw_den, T, pm_req, gm_req, Kv_req)[source]¶
- Parameters:
Gw_num (numpy.ndarray)
Gw_den (numpy.ndarray)
T (float)
pm_req (float)
gm_req (float)
Kv_req (float)
- Return type:
- system_design.frequencyResponseTool.core.closed_loop_desc(num_ol, den_ol)[source]¶
- Parameters:
num_ol (List[float])
den_ol (List[float])
- Return type:
tuple[list[float], list[float]]
- system_design.frequencyResponseTool.core.estimate_Kv(num_asc, den_asc, nu_small)[source]¶
- Parameters:
num_asc (numpy.ndarray)
den_asc (numpy.ndarray)
nu_small (numpy.ndarray)
- Return type:
float
- system_design.frequencyResponseTool.core.eval_rational_asc(num_asc, den_asc, jw)[source]¶
- Parameters:
num_asc (numpy.ndarray)
den_asc (numpy.ndarray)
jw (numpy.ndarray)
- Return type:
numpy.ndarray
- system_design.frequencyResponseTool.core.lag_w_to_z(p, T)[source]¶
- Parameters:
p (Lag)
T (float)
- Return type:
tuple[list[float], list[float]]
- system_design.frequencyResponseTool.core.laglead_w_to_z(p, T)[source]¶
- Parameters:
p (LagLead)
T (float)
- Return type:
tuple[list[float], list[float]]
- system_design.frequencyResponseTool.core.lead_w_to_z(p, T)[source]¶
- Parameters:
p (Lead)
T (float)
- Return type:
tuple[list[float], list[float]]
- system_design.frequencyResponseTool.core.series_desc(num1, den1, num2, den2)[source]¶
- Parameters:
num1 (List[float])
den1 (List[float])
num2 (List[float])
den2 (List[float])
- Return type:
tuple[list[float], list[float]]
system_design.frequencyResponseTool.design¶
- class system_design.frequencyResponseTool.design.MatplotlibPlotter(save_pngs=True)[source]¶
Bases:
object- Parameters:
save_pngs (bool)
- system_design.frequencyResponseTool.design.bode_from_asc(num_asc, den_asc, nu)[source]¶
- Parameters:
num_asc (Iterable[float])
den_asc (Iterable[float])
nu (numpy.ndarray)
- Return type:
tuple[numpy.ndarray, numpy.ndarray]
- system_design.frequencyResponseTool.design.compute_margins(nu, mag_db, phase_deg)[source]¶
- Parameters:
nu (numpy.ndarray)
mag_db (numpy.ndarray)
phase_deg (numpy.ndarray)
- Return type:
system_design.frequencyResponseTool.utils¶
- system_design.frequencyResponseTool.utils.ensure_dir(d)[source]¶
- Parameters:
d (str)
- Return type:
None
- system_design.frequencyResponseTool.utils.log_call(name=None)[source]¶
- Parameters:
name (str | None)
- Return type:
Callable
- system_design.frequencyResponseTool.utils.poly_add_desc(a, b)[source]¶
- Parameters:
a (Iterable[float])
b (Iterable[float])
- Return type:
list[float]