%contform.m
%Controller Form

clear all
clc

a0=sym('a0');
a1=sym('a1');
a2=sym('a2');
a3=sym('a3');

A=[-a3 -a2 -a1 -a0; 1 0 0 0; 0 1 0 0; 0 0 1 0]
B=[1; 0; 0; 0]

Cont=[B A*B A^2*B A^3*B]
Continv=simplify(inv(Cont))

k1=sym('k1');
k2=sym('k2');
k3=sym('k3');
k4=sym('k4');

K=[k1 k2 k3 k4];

Acl=A-B*K