thanks for you answer. I just tried, but coudn't get it work. I used the beforeRender plugin.
$app = JFactory::getApplication();
$menu = $app->getMenu()->getActive()->link;
$url = JRoute::_($menu);
$canonical = '<link rel="canonical" href="'.$url.'" />';
$document = JFactory::getDocument();
$document->addCustomTag($canonical);