I continued with my experiment and I have now run into issues with bodeplot. Below is the description:
using ControlSystems
w = logspace(1.0, 7.5, 1000)
Vout = big"1.0"
Iout = big"5.0"
rl = Vout/Iout
L = big"150.0e-9"
dcr = big"2.0e-3" # actual dcr is 0.2 mohm. I am adding the scaled top/bottom fet resistances.
nbulk = 12
cbulk = big"470.0e-6"
esr_bulk = big"4.5e-3"
ncer = 96
ccer = big"14.0e-6" #22uF derated for 1V DC.
esr_cer = big"2.0e-3"
nph = 1
s = tf("s")
l_imp = dcr + L*s
bulk_imp = (esr_bulk/nbulk) + 1.0/(cbulk*nbulk*s)
cer_imp = (esr_cer/ncer) + 1.0/(ccer*ncer*s)
cer_load_imp = cer_imp*rl/(cer_imp + rl) #ceramic + load resistance.
den = (bulk_imp + cer_load_imp) |> minreal
num = (bulk_imp * cer_load_imp) |> minreal
#tot_load_imp = tf(num.matrix[1].num.a, den.matrix[1].num.a)
tot_load_imp = num/den |> minreal
tot_load_tf = tot_load_imp/(l_imp + tot_load_imp) |> minreal
This gives me a s funtion.
bodeplot(tot_load_tf, w, title="total load tf")
This bode plot looked good.
zpkdata(tot_load_tf)
I got the poles, zeroes, gain as vectors. So far so good.
I then visually inspected the poles and zeros and removed a matching pole/zero combination.
redu_load_tf = zpk([-4.66636e5+0.0im], [-7846.57-30034.0im,-7846.57+30034.0im,-2.32861e6-0.0im], 4.76099e9) |> minreal
Got the reduced s function.
bodeplot(redu_load_tf, w, title="reduced tf")
No bodeplot!
I get:
MethodError: no method matching *(::ControlSystems.##5#7{Complex{Float64}}, ::ControlSystems.Poly{Float64})
Closest candidates are:
*(::Any, ::Any, ::Any, ::Any…) at operators.jl:138
*(::PyCall.PyObject, ::Any) at /home/venkat/.julia/v0.5/PyCall/src/pyoperators.jl:11
*(::Number, ::ControlSystems.Poly{T<:Number}) at /home/venkat/.julia/v0.5/ControlSystems/src/types/polys.jl:82
…
in mapfoldl_impl(::Base.#identity, ::Base.#*, ::Function, ::Array{ControlSystems.Poly{Float64},1}, ::Int64) at ./reduce.jl:46
in evalfr(::ControlSystems.SisoZpk, ::Complex{Float64}) at /home/venkat/.julia/v0.5/ControlSystems/src/types/sisozpk.jl:99
in _collect(::Array{ControlSystems.SisoZpk,2}, ::Base.Generator{Array{ControlSystems.SisoZpk,2},ControlSystems.##183#184{Complex{Float64}}}, ::Base.EltypeUnknown, ::Base.HasShape) at ./array.jl:320
in freqresp(::ControlSystems.TransferFunction{ControlSystems.SisoZpk}, ::Array{Float64,1}) at /home/venkat/.julia/v0.5/ControlSystems/src/freqresp.jl:24
in bode at /home/venkat/.julia/v0.5/ControlSystems/src/freqresp.jl:113 [inlined]
in #bodeplot#208(::Bool, ::Array{Any,1}, ::Function, ::Array{ControlSystems.TransferFunction{ControlSystems.SisoZpk},1}, ::Array{Float64,1}) at /home/venkat/.julia/v0.5/ControlSystems/src/plotting.jl:141
in (::ControlSystems.#kw##bodeplot)(::Array{Any,1}, ::ControlSystems.#bodeplot, ::Array{ControlSystems.TransferFunction{ControlSystems.SisoZpk},1}, ::Array{Float64,1}) at ./:0
in #bodeplot#211(::Bool, ::Array{Any,1}, ::Function, ::ControlSystems.TransferFunction{ControlSystems.SisoZpk}, ::Array{Float64,1}, ::Vararg{Array{Float64,1},N}) at /home/venkat/.julia/v0.5/ControlSystems/src/plotting.jl:164
in (::ControlSystems.#kw##bodeplot)(::Array{Any,1}, ::ControlSystems.#bodeplot, ::ControlSystems.TransferFunction{ControlSystems.SisoZpk}, ::Array{Float64,1}) at ./:0
in include_string(::String, ::String) at ./loading.jl:441