text
stringlengths 0
828
|
---|
Vβ Zβ
|
ββ = ββ
|
Vβ Zβ
|
Let us substitute a default value of 1 for terms Z1 and Z2:
|
>>> sp.pprint(subs_default(H, ['Z1', 'Z2'], 1))
|
Vβ
|
ββ = 1
|
Vβ
|
Now, let us specify a default value of 1 for terms Z1 and Z2, but provide
|
an overriding value for Z1:
|
>>> sp.pprint(subs_default(H, ['Z1', 'Z2'], 1, Z1=4))
|
Vβ
|
ββ = 1/4
|
Vβ
|
Note that keyword arguments for terms not specified in the list of symbol
|
names are ignored:
|
>>> sp.pprint(subs_default(H, ['Z1', 'Z2'], 1, Z1=4, Q=7))
|
Vβ
|
ββ = 1/4
|
Vβ
|
'''
|
if mode == 'subs':
|
swap_f = _subs
|
default_swap_f = _subs
|
elif mode == 'limit':
|
swap_f = _limit
|
default_swap_f = _subs
|
elif mode == 'limit_default':
|
swap_f = _subs
|
default_swap_f = _limit
|
else:
|
raise ValueError('''Unsupported mode. `mode` must be one of: '''
|
'''('subs', 'limit').''')
|
result = equation
|
for s in symbol_names:
|
if s in kwargs:
|
if isinstance(kwargs[s], Iterable):
|
continue
|
else:
|
result = swap_f(result, s, kwargs[s])
|
else:
|
result = default_swap_f(result, s, default)
|
return result"
|
182,"def z_transfer_functions():
|
r'''
|
Return a symbolic equality representation of the transfer function of RMS
|
voltage measured by either control board analog feedback circuits.
|
According to the figure below, the transfer function describes the
|
following relationship::
|
# Hardware V1 # # Hardware V2 #
|
Vβ Vβ Vβ Zβ
|
ββ = βββββββ ββ = ββ
|
Zβ Zβ + Zβ Vβ Zβ
|
where $V_{1}$ denotes the high-voltage actuation signal from the amplifier
|
output and $V_{2}$ denotes the signal sufficiently attenuated to fall
|
within the measurable input range of the analog-to-digital converter
|
*(approx. 5V)*. The feedback circuits for control board **hardware version
|
1** and **hardware version 2** are shown below.
|
.. code-block:: none
|
# Hardware V1 # # Hardware V2 #
|
V_1 @ frequency V_1 @ frequency
|
β― β―
|
βββ΄ββ βββ΄ββ βββββ
|
βZ_1β βZ_1β βββ€Z_2βββ
|
βββ¬ββ βββ¬ββ β βββββ β
|
βββββΈ V_2 β β ββ² βββββΈ V_2
|
βββ΄ββ ββββββ΄βββ-β²__β
|
βZ_2β ββββ+β±
|
βββ¬ββ β ββ±
|
ββ§β β
|
Β― ββ§β
|
Β―
|
Notes
|
-----
|
- The symbolic equality can be solved for any symbol, _e.g.,_ $V_{1}$ or
|
$V_{2}$.
|
- A symbolically solved representation can be converted to a Python function
|
using `sympy.utilities.lambdify.lambdify`_, to compute results for
|
specific values of the remaining parameters.
|
.. _`sympy.utilities.lambdify.lambdify`: http://docs.sympy.org/dev/modules/utilities/lambdify.html
|
'''
|
# Define transfer function as a symbolic equality using SymPy.
|
V1, V2, Z1, Z2 = sp.symbols('V1 V2 Z1 Z2')
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.