The command loopsyn lets you design a stabilizing feedback controller to optimally shape the open loop frequency response of a MIMO feedback control system to match as closely as possible a desired loop shape Gd — see the preceding figure. The basic syntax of the loopsyn loop-shaping controller synthesis command is:
K = loopsyn(G,Gd)
Here G is the LTI transfer function matrix of a MIMO plant model, Gd is the target desired loop shape for the loop transfer function L=G*K, and K is the optimal loop-shaping controller. The LTI controller K has the property that it shapes the loop L=G*K so that it matches the frequency response of Gd as closely as possible, subject to the constraint that the compensator must stabilize the plant model G.