I have a multi-port S parameters file, and I want to convert is into Verilog-A module using the rational function object.
My Touchstone filename is 'tmp.s55p' (for a 55 port network), and I execute the following MATLAB code –
**>> sp = sparameters('tmp.s55p')sp =sparameters: S-parameters objectNumPorts: 55Frequencies: [217×1 double]Parameters: [55×55×217 double]Impedance: 50>> freq = sp.Frequencies;>> param = sp.Parameters;>> fit = rationalfit(freq,param)Warning: Achieved only -18.1 dB accuracy with 48 poles, not -40.0 dB. Consider specifying a larger number of poles using the 'NPoles' parameter.> In rationalfitcoreIn rationalfit (line 112)fit =55x55 rfmodel.rational array with properties:ACDDelayName>> status = writeva(fit, 'tmp')Error: rfmodel.rational/checkproperty (line 17)The first input argument rfmodel.rational must be a scalar.Error: rfmodel.rational/writeva (line 81)checkproperty(h);
Best Answer