Bouzid.wis,
?
I am having trouble trying to understand how this circuit works.
?
In the upper submodule, it seems like M1 can not do much, because C1 would charge and then not pass any more current, so that closing M1 does not add any more change.? But I think it is not as simple as that.? There are multiple current paths here, including through the capacitors and through the diodes that bypass the FETs.
?
Can you describe how each submodule was supposed to pull the output either up, or down?
?
Is there a minimum frequency limit for the sinusoidal signal you want to synthesize?
?
As drawn here, the two submodules are not symmetrical to each other.? But maybe that was just a personal choice about how the schematic was made.
?
I am only guessing here, but it looks like maybe you have one of the submodules inverted.? When the voltage V(ControlA) approaches +1V, the FETs with the DC path (M2 and M4) are both OFF while the two with series capacitors and no DC path (M1 and M3) are both ON.? So very little current can flow through L2 or L3, to or from the load.? When V(ControlA) approaches -1V, it is the opposite:? both DC-path FETS are ON, resulting in lots of current in L2 and then out L3 without making it to the output load.? In both cases, the output gets nothing.? Check your connections because I think it is not right.
?
But as far as SPICE goes, I think it simulates OK.
?
FYI, there are easier ways to generate triangle waves.? The normal voltage source with PULSE is ideal for this.
? ? Vm Tri_up 0 PULSE (-1 1 0 50u 50u 0 100u)
? ? Vn Tri_dwn 0 PULSE (1 -1 0 50u 50u 0 100u)
or
? ? .param RF=0.5/fs? ; Rise and Fall time
? ? Vm Tri_up 0 PULSE (-1 1 0 {RF} {RF} 0 {2*RF})
? ? Vn Tri_dwn 0 PULSE (1 -1 0 {RF} {RF} 0 {2*RF})
But it doesn't hurt to do it the way you did.
?
Andy
?
?