Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Transfer function tanh(Tes)
#1
Hi,
I need to build a transfer function ( see the attached screenshot)    
FS= (1-ZP.tanh(Te.s))/(1+ZP.tanh(Te.s))

s = control.TransferFunction.s
x=Tep*s
Fs=1/(Zp*np.tanh(x))
I am getting following error:
Error:
AttributeError Traceback (most recent call last) AttributeError: 'TransferFunction' object has no attribute 'tanh'
The above exception was the direct cause of the following exception:
Error:
TypeError Traceback (most recent call last) <ipython-input-84-f6843dc03fc2> in <module> ----> 1 Fs=1/(Zp*np.tanh(x)) TypeError: loop of ufunc does not support argument 0 of type TransferFunction which has no callable tanh method
Can anyone help me on this code.

Regards,
Yoriz write Aug-20-2021, 05:59 AM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply
#2
Please show code (within bbcode tags)
Reply
#3
import math
import numpy as np
import scipy.signal
from scipy import linalg

import control

Twp= 1 

Tep= 0.5 
Zp=Twp/Tep

s = control.TransferFunction.s

x=Tep*s

Fs=1/(Zp*np.tanh(x))
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Transfer function victoriomariani 0 606 Dec-10-2022, 01:39 PM
Last Post: victoriomariani
Information Estimating transfer function from frd data ymohammadi 0 1,454 Feb-10-2022, 10:00 AM
Last Post: ymohammadi
  Cant transfer a variable onto another function KEIKAS 5 1,906 Feb-09-2022, 10:17 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020