Symbolic Analysis

CCICAP offers 2 modes of symbolic analysis of linear circuits. If symbolic analysis is requested with:

.symbol

CCICAP returns the network transfer function in terms of the circuit element values. In this case the poles and zeros of the transfer function are also provided.

For example, the following CCICAP input file:

.title symbolic analysis
.symbol
.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
vm eout 2 0 
.end
.go
.stop

returns:

 Network function coefficients:

        Power            Numerator           Denominator
        of S   

           0              1.0000E+00          1.0000E+00
           1              0.0000E+00          1.0000E+00

 The network function gain =  1.0000E+00

 Poles, Q and Omega values
    I           Pole(i)                     Q(I)          Omega(I)
        -----------------------
    1   -1.0000E+00  0.0000E+00          5.0000E-01     1.0000E+00

This can be interpreted at:

  T(S) = 1 / (S + 1)

If symbolic analysis is requested as:

.symbol T1 T2  ...

where T1, T2, ... are the names of circuit elements then the network transfer function is returned in terms of the circuit element names. For example the following CCICAP input file:

.title symbolic analysis
.symbol r1 c1
.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
vm eout 2 0 
.end
.go
.stop

returns:

Symbolic Analysis

 Symbolic function in terms of variable elements
 Input at ein , Output at eout.

 Variable(s)                                   Power Numerator    Denominator
 Elements                                      of S  

 1/r1          
                                                  0   1.0000E+00   1.0000E+00
        c1     
                                                  1   0.0000E+00   1.0000E+00

which can be interpreted as:

  T(S) = (1/r1) / (c1*S + (1/r1))

In normalized form this would be written as:

  T(S) = (1/(r1*c1)) / (S + (1/(r1*c1)))

The following example shows the symbolic analysis of an RC band pass filter. Here is the CCICAP input file:

.title Symbolic analysis of RC band pass filter
.symbol
.par wo 1.
.ac 25 10 { wo 2 / PI / 10. / } { wo 2 / PI / 10. X }
.plot ac png eout
.plot ac png eout >
.tr 100 0.0 3.0
.plot tr png eout

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 { wo r1 X 1 XY / }
c c2 2 3 { c1 }
r r2 3 0 1.
vm eout 3 0
.end

.go
.stop

You can see the results of this analysis here.

The symbolic analysis results are presented as:

( 0, 0)                                 Symbolic analysis of RC band pass filter
 Symbolic Analysis

 Network function coefficients:

        Power            Numerator           Denominator
        of S   

           0              0.0000E+00          1.0000E+00
           1              1.0000E+00          3.0000E+00
           2              0.0000E+00          1.0000E+00

This can be read as an S domain transfer function:

  T(S) = S / (S^2 + 3.0*S + 1.0)

Symbolic analysis works best on normalized circuits that are studied in the vicinity of 1 rps using CCICAP-Pro.

This example can be extended. The following CCICAP input file returns a symbolic analysis for RC filters of order 1 through 14. The single precision accuracy of CCICAP can be seen in errors for the coefficients of the higher order filters.

For example, the result for the order 14 filter from CCICAP is:

 Symbolic Analysis

 Network function coefficients:

        Power            Numerator           Denominator
        of S   

           0              0.0000E+00          1.0208E+00
           1              0.0000E+00          3.3002E+01
           2              0.0000E+00          4.6600E+02
           3              0.0000E+00          3.6830E+03
           4              0.0000E+00          1.7901E+04
           5              0.0000E+00          5.5448E+04
           6              0.0000E+00          1.1013E+05
           7              9.8994E-01          1.3890E+05
           8              0.0000E+00          1.1013E+05
           9              0.0000E+00          5.5448E+04
          10              0.0000E+00          1.7901E+04
          11              0.0000E+00          3.6830E+03
          12              0.0000E+00          4.6601E+02
          13              0.0000E+00          3.3013E+01
          14              0.0000E+00          1.0167E+00

CCICAP-Pro is double precision and does not show these errors. Using CCICAP-Pro the result for the order 14 filter is:

 Symbolic Analysis

 Network function coefficients:

        Power            Numerator           Denominator
        of S   

           0              0.0000E+00          1.0000E+00
           1              0.0000E+00          3.3000E+01
           2              0.0000E+00          4.6600E+02
           3              0.0000E+00          3.6830E+03
           4              0.0000E+00          1.7901E+04
           5              0.0000E+00          5.5448E+04
           6              0.0000E+00          1.1013E+05
           7              1.0000E+00          1.3890E+05
           8              0.0000E+00          1.1013E+05
           9              0.0000E+00          5.5448E+04
          10              0.0000E+00          1.7901E+04
          11              0.0000E+00          3.6830E+03
          12              0.0000E+00          4.6600E+02
          13              0.0000E+00          3.3000E+01
          14              0.0000E+00          1.0000E+00

The results of the (single precision) CCICAP run can be seen here.

.title Symbolic 1
.symbol
.opt rps ntab
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
vm eout 2 0
.end

.go

.next

.title Symbolic 2
.symbol
.opt rps ntab
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
vm eout 3 0
.end

.go

.next

.title Symbolic 3
.symbol
.opt rps ntab
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
r r3 3 4 1.
c c3 4 0 1.
vm eout 4 0
.end

.go

.next

.title Symbolic 4
.symbol
.opt rps ntab
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
r r3 3 4 1.
c c3 4 0 1.
c c4 4 5 1.
r r4 5 0 1.
vm eout 5 0
.end

.go

.next

.title Symbolic 5
.symbol
.opt rps ntab
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
r r3 3 4 1.
c c3 4 0 1.
c c4 4 5 1.
r r4 5 0 1.
r r5 5 6 1.
c c6 6 0 1.
vm eout 6 0
.end

.go

.next

.title Symbolic 6
.symbol
.opt rps ntab
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
r r3 3 4 1.
c c3 4 0 1.
c c4 4 5 1.
r r4 5 0 1.
r r5 5 6 1.
c c5 6 0 1.
c c6 6 7 1.
r r6 7 0 1.
vm eout 7 0
.end

.go

.next

.title Symbolic 7
.symbol
.opt rps ntab
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
r r3 3 4 1.
c c3 4 0 1.
c c4 4 5 1.
r r4 5 0 1.
r r5 5 6 1.
c c5 6 0 1.
c c6 6 7 1.
r r6 7 0 1.
r r7 7 8 1.
c c7 8 0 1.
vm eout 8 0
.end

.go

.next

.title Symbolic 8
.symbol
.opt rps ntab
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
r r3 3 4 1.
c c3 4 0 1.
c c4 4 5 1.
r r4 5 0 1.
r r5 5 6 1.
c c5 6 0 1.
c c6 6 7 1.
r r6 7 0 1.
r r7 7 8 1.
c c7 8 0 1.
c c8 8 9 1.
r r8 9 0 1.
vm eout 9 0
.end

.go

.next

.title Symbolic 9
.symbol
.opt rps ntab
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
r r3 3 4 1.
c c3 4 0 1.
c c4 4 5 1.
r r4 5 0 1.
r r5 5 6 1.
c c5 6 0 1.
c c6 6 7 1.
r r6 7 0 1.
r r7 7 8 1.
c c7 8 0 1.
c c8 8 9 1.
r r8 9 0 1.
r r9 9 10 1.
c c9 10 0 1.

vm eout 10 0
.end

.go

.next

.title Symbolic 10
.symbol
.opt rps ntab
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
r r3 3 4 1.
c c3 4 0 1.
c c4 4 5 1.
r r4 5 0 1.
r r5 5 6 1.
c c5 6 0 1.
c c6 6 7 1.
r r6 7 0 1.
r r7 7 8 1.
c c7 8 0 1.
c c8 8 9 1.
r r8 9 0 1.
r r9 9 10 1.
c c9 10 0 1.
c c10 10 11 1.
r r10 11 0 1.
vm eout 11 0
.end

.go

.next

.title Symbolic 11
.symbol
.opt rps ntab
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
r r3 3 4 1.
c c3 4 0 1.
c c4 4 5 1.
r r4 5 0 1.
r r5 5 6 1.
c c5 6 0 1.
c c6 6 7 1.
r r6 7 0 1.
r r7 7 8 1.
c c7 8 0 1.
c c8 8 9 1.
r r8 9 0 1.
r r9 9 10 1.
c c9 10 0 1.
c c10 10 11 1.
r r10 11 0 1.
r r11 11 12 1.
c c11 12 0 1.
vm eout 12 0
.end

.go

.next

.title Symbolic 12
.symbol
.opt rps ntab
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
r r3 3 4 1.
c c3 4 0 1.
c c4 4 5 1.
r r4 5 0 1.
r r5 5 6 1.
c c5 6 0 1.
c c6 6 7 1.
r r6 7 0 1.
r r7 7 8 1.
c c7 8 0 1.
c c8 8 9 1.
r r8 9 0 1.
r r9 9 10 1.
c c9 10 0 1.
c c10 10 11 1.
r r10 11 0 1.
r r11 11 12 1.
c c11 12 0 1.
c c12 12 13 1.
r r12 13 0 1.
vm eout 13 0
.end

.go

.next

.title Symbolic 13
.symbol
.opt rps ntab size
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
r r3 3 4 1.
c c3 4 0 1.
c c4 4 5 1.
r r4 5 0 1.
r r5 5 6 1.
c c5 6 0 1.
c c6 6 7 1.
r r6 7 0 1.
r r7 7 8 1.
c c7 8 0 1.
c c8 8 9 1.
r r8 9 0 1.
r r9 9 10 1.
c c9 10 0 1.
c c10 10 11 1.
r r10 11 0 1.
r r11 11 12 1.
c c11 12 0 1.
c c12 12 13 1.
r r12 13 0 1.
r r13 13 14 1.
c c13 14 0 1.
vm eout 14 0
.end

.go

.next

.title Symbolic 14
.symbol
.opt rps ntab size
.ac 25 10 .01 100.
.plot ac pdf eout
.plot ac pdf eout >

.ckt
v ein 1 0 1.
r r1 1 2 1.
c c1 2 0 1.
c c2 2 3 1.
r r2 3 0 1.
r r3 3 4 1.
c c3 4 0 1.
c c4 4 5 1.
r r4 5 0 1.
r r5 5 6 1.
c c5 6 0 1.
c c6 6 7 1.

r r6 7 0 1.
r r7 7 8 1.
c c7 8 0 1.
c c8 8 9 1.
r r8 9 0 1.
r r9 9 10 1.
c c9 10 0 1.
c c10 10 11 1.
r r10 11 0 1.
r r11 11 12 1.
c c11 12 0 1.
c c12 12 13 1.
r r12 13 0 1.
r r13 13 14 1.
c c13 14 0 1.
c c14 14 15 1.
r r14 15 0 1.
vm eout 15 0
.end

.go

.stop