Trying to simulate a PWM model of a boost converter in gnucap
I think the gain of Es should be 1/N, not N, to correctly model the N:1 "DC transformer".  (The "reverse" current transfer ratio should be the same as the "forward" voltage transfer ratio.)

Also, although it doesn't matter in this case, in the SPICEs I've seen, your RLnk=1M would be a 1 milliohm resistor short from p2 to s2; a value of 1MEG would give 1 megohm.  (Maybe your program uses a different convention?)