/////////////////////////////////////////////////////////////////////
// Example : Manufacturing System
//	
/////////////////////////////////////////////////////////////////////
	
///*****************************************************
// transfer matrix evaluation  H = CA*B

 
	
        H=s_matrix(1,2);

	
	H(1,1)=series(epsilon,[0,7],[1,3]);
	H(1,2)=series(epsilon,[0,9],[1,4]) 

	


///*****************************************************
// Reference Model

      	Gref = s_matrix(1,2);

         Gref(1,1)=series(epsilon,[0,10],[1,4]);  // 4
	 Gref(1,2)=series(epsilon,[0,10],[1,4])  

        
         AA=lfrac(Gref,H); BB=  rfrac(Gref,H);

         AA==stargd(AA)  // Gref =/= A*H ???

         BB==stargd(BB)   // Gref =/= H*A ???

    



//******************************************************/
// Control which preserves the output 
//  ( Precompesator + Feedback)

// Precompesator  P= H\Gref

        P=lfrac(Gref,H)

	P=prcaus(P)

        HP =  otimes(H,P)
        
       
// Feedback  F= HP\HP/HP

    	F=rfrac(lfrac(HP,HP),HP)

        F=prcaus(F)
        
    	F_sansP=prcaus(rfrac(lfrac(Gref,H),H))   
    

// Output

	FHP=otimes(F,HP);

	Guv= otimes(P,stargd(FHP))

        Guv_sansP=stargd(otimes(F_sansP,H))
        
	GF=otimes(HP,stargd(FHP))

        GF_sansP=otimes(H,Guv_sansP)   

        Guv== oplus(Guv, Guv_sansP)

        GF== oplus(GF, GF_sansP)


        