Exemplo n.º 1
0
def calc_AFB(Ga):
    Ga_comp = Ga(s)
    afb_a_comp = thfb_a_comp/(1.0+Ga_comp*thfb_a_comp)
    myopts = SFLR_bode_options.AccelFB_Bode_opts
    afb_a_bode = BPO.comp_to_Bode(afb_a_comp, f, \
                                  bode_opt=myopts[1])
    return afb_a_bode
Exemplo n.º 2
0
def ThetaFB_bode_plots(fi=3, resave=0):
    ThetaFB_Exp_Bode_Plotter = build_ThetaFB_exp_Bode_plotter()
    design_dir = rwkos.FindFullPath('SFLR_2010/vibration_suppression_design/TMM')

    if design_dir not in sys.path:
        sys.path.append(design_dir)


    Gth_TMM = build_Gth_TMM_model()

    import Gth
    reload(Gth)

    ThetaFB_TMM_Bode_Plotter = BPO.TMM_bode_object(Gth_TMM, \
                                                   ThetaFB_Bode_opts)

    ThetaFB_Plotters =[ThetaFB_Exp_Bode_Plotter, \
                       ThetaFB_TMM_Bode_Plotter, \
                      ]

    ThetaFB_overlayer = BPO.Bode_Overlayer(ThetaFB_Plotters, \
                                           ThetaFB_Bode_opts)
    ThetaFB_overlayer.plot_bodes(f, startfi=fi)

    th_comp, a_comp = model_w_bm_bodes_ThetaFB_editted.Bodes(s, \
                                                             params, \
                                                             Gth.Gth)
    PU.SetLegend(fi,axis=0,loc=3)
    PU.SetLegend(fi+1,axis=0,loc=2)

    if resave:
        mysave('thetafb_theta_thd_bode.eps', fi)
        mysave('thetafb_a_thd_bode.eps', fi+1)


    th_bode_opt = ThetaFB_Bode_opts[0]
    a_bode_opt = ThetaFB_Bode_opts[1]
    th_bode = BPO.comp_to_Bode(th_comp, f, bode_opt=th_bode_opt)
    a_bode = BPO.comp_to_Bode(a_comp, f, bode_opt=a_bode_opt)
    BPO._plot_bode(th_bode, th_bode_opt, f, fignum=fi, linetype='k:')
    BPO._plot_bode(a_bode, a_bode_opt, f, fignum=fi+1, linetype='k:')
Exemplo n.º 3
0
def calc_Accel_comp(Ga):
    Ga_comp = Ga(s)
    a_comp = Ga_comp*thfb_a_comp
    a_bode = BPO.comp_to_Bode(a_comp, f, \
                              bode_opt=Accel_Comp_Bode_opts[1])
    return a_bode